<?php


namespace app\index\model;


use app\index\common\Common;
use think\Model;

class WaybillImage extends Model
{
    public static function getImageById($id){
        $WaybillImageClass=new self();
        $image=$WaybillImageClass->where('waybill_id',$id)->where('del_flag',0)->order('create_time')->field('image')->select()->toArray();
        $image_list=[];
        foreach ($image as $key=>$value){
            $image_list[]=['uid'=>0,'url'=>Common::getThumbImage($value['image']),'image'=>$value['image']];
        }
        return $image_list;
    }

}